package com.rockcent.mall.lib.domain;

import com.rockcent.common.domain.IDEntityMall;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * Created by zhangjh on 2016/10/27.
 */
@Entity
@Table(name = "customer_product_limit")
@DynamicInsert
@DynamicUpdate
public class CustomerProductLimit extends IDEntityMall {
    @Column(columnDefinition = "int(11) comment'已经购买数量'")
    private Integer alreadyBuyCount;
    @Column(columnDefinition = "bigint comment'用户ID'")
    private Long customerId;
    @Column(columnDefinition = "bigint comment'平台id'")
    private Long mallId;
    @Column(columnDefinition = "varchar(255) comment'商铺名称'")
    private String merchantName;
    @Column(columnDefinition = "bigint comment'商品ID'")
    private Long productId;

    public Integer getAlreadyBuyCount() {
        return alreadyBuyCount;
    }

    public void setAlreadyBuyCount(Integer alreadyBuyCount) {
        this.alreadyBuyCount = alreadyBuyCount;
    }

    public Long getCustomerId() {
        return customerId;
    }

    public void setCustomerId(Long customerId) {
        this.customerId = customerId;
    }

    public Long getMallId() {
        return mallId;
    }

    public void setMallId(Long mallId) {
        this.mallId = mallId;
    }

    public String getMerchantName() {
        return merchantName;
    }

    public void setMerchantName(String merchantName) {
        this.merchantName = merchantName;
    }

    public Long getProductId() {
        return productId;
    }

    public void setProductId(Long productId) {
        this.productId = productId;
    }

    @Override
    public String toString() {
        return "CustomerProductLimit{" +
                "alreadyBuyCount=" + alreadyBuyCount +
                ", customerId=" + customerId +
                ", id=" + id +
                ", mallId=" + mallId +
                ", dateCreated=" + dateCreated +
                ", merchantName='" + merchantName + '\'' +
                ", lastUpdated=" + lastUpdated +
                ", productId=" + productId +
                ", isDelete=" + isDelete +
                ", version=" + version +
                '}';
    }
}
